﻿/**
 * Model representing a Tracing object
 */
Ext.define('Sisconsolid.model.Tracing', {
      extend: 'Ext.data.Model',
      requires: [
          'Sisconsolid.proxy.Rest'
      ],
      idProperty: 'idTracing',
      fields: [
            // id field
            {
                  name: 'idTracing',
                  type: 'int',
                  useNull : true
            },
            {
                  name: 'dateAccomplished',
                  type: 'date',
				  dateFormat :'Y-m-d'
            },
			{
                  name: 'timeAccomplished',
                  type: 'string'
            },
            {
                  name: 'attendedCell',
                  type: 'boolean'
            },
            {
                  name: 'attendedService',
                  type: 'boolean'
            },
            {
                  name: 'result',
                  type: 'string'
            },
            {
                  name: 'need',
                  type: 'string'
            },
            {
                  name: 'idCell',
                  type: 'int'
            },
			{
				  name: 'idTracingType',
				  type: 'int'
			},
			{
				  name: 'idConsolidation',
				  type: 'int'
			},
			{
				  name: 'tracingType',
				  type: 'string',
				  persits: false
			}
      ],
	  proxy: {
		  type: 'baserest',
		  url: '/sisconsolid/rest/tracings'
	  } 
});